﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using StayInTouch.Core.Model;
using StayInTouch.Properties;


namespace StayInTouch.Core.Model
{
    [Serializable]
    public class Contact : INotifyPropertyChanged
    {
        #region Properties

        public Guid Id;
        private string name;

        public string Name
        {
            get { return name; }
            set 
            {
                if (name != value)
                {
                NotifyPropertyChanged(Resources.NAME_PROPERTY);
                name = value; 
                }
            }
        }

        #endregion

        #region Constructor

        public Contact()
        {
        }
        
        public Contact(Guid id)
        {
            this.Id = id;
        }



        #endregion

        #region INotifyPropertyChanged implementation

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }

        #endregion

    }
}
